package com.example.demo.service;

import com.example.demo.dao.TeacherDao;
import com.example.demo.entity.Teacher;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class TeacherServiceImpl implements TeacherService {
    @Autowired
    TeacherDao teacherDao;
    @Override
    public List<Teacher> getTeacher() {
        return teacherDao.getAllTeacher();
    }

    @Override
    public int NumOfTeacher() {
        List<Teacher> teachers = teacherDao.getAllTeacher();
        return teachers.size();
    }



}
